package org.wang.generalcode.support.config;

import com.ulisesbocchio.jasyptspringboot.EncryptablePropertyResolver;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.wang.generalcode.support.sm4.SM4EncryptablePropertyDetector;
import org.wang.generalcode.support.sm4.SM4EncryptablePropertyResolver;

@Configuration
public class JasyptConfig {
    @Bean
    public SM4EncryptablePropertyDetector encryptablePropertyDetector() {
        return new SM4EncryptablePropertyDetector();
    }

    @Bean
    public EncryptablePropertyResolver encryptablePropertyResolver() {
        return new SM4EncryptablePropertyResolver(encryptablePropertyDetector());
    }

}
